package org.feng.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 自定义切面<br>
 * 写法参考：https://blog.csdn.net/qq_41820828/article/details/121097544
 *
 * @version v1.0
 * @author: fengjinsong
 * @date: 2022年07月01日 23时15分
 */
@Slf4j
@Order(1)
@Aspect
@Component
public class MyAspect {

    @Pointcut("execution(* org.feng.businessbean.*.doSome())")
    public void method(){
    }

    @Before("method()")
    public void before(){
        log.info("doSome() -> before();");
    }
}
